package com.junbao.androidinterview.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * author : Majunbao
 * github : https://github.com/MaJunBaox
 * time   : 2022/8/11 11:54 下午
 * desc   :
 */
public class Group {
    private int id;
    private List<Student> mStudents;//小组内的学生

    public Group(int id) {
        this.id = id;
        mockStudents();
    }

    private void mockStudents(){
        mStudents = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            String name = "Group" + id + "_" + String.valueOf(i);
            Student student = new Student(name);
            mStudents.add(student);
        }
    }

    public List<Student> getmStudents() {
        return mStudents;
    }

    public int getId() {
        return id;
    }

    @Override
    public String toString() {
        return "Group"+getId();
    }
}
